ihelpuoo.weboo.runtime.ModuleHTML = function()
{
	this.shell = document.createElement("DIV");
	this.icon = document.createElement("IMG");
	this.title = document.createElement("A");
	this.sub = document.createElement("DIV");
	this.sub.className = "submenu";
	this.icon.className = "icon16";
	this.icon.src = ihelpuoo.http.server().icon("001.gif");
	this.title.href = ihelpuoo.http.server().blankHref;
	this.title.className = "menu";
	this.shell.className = "shell";
	this.shell.appendChild(this.icon);
	this.shell.appendChild(this.title);
	this.shell.appendChild(this.sub);
	
	var eventHandler = new ihelpuoo.weboo.runtime.ModuleEventHandler();
	ihelpuoo.event.add(this.title,"click",eventHandler.onClickTitle);
	ihelpuoo.event.add(this.icon,"click",eventHandler.onClickIcon);
}

ihelpuoo.weboo.runtime.ModuleHTML.prototype
=
{
	setName: function(name)
	{
		this.title.innerHTML = name;
		this.icon.setAttribute("name",name);
	}
	
	,
	openSub: function()
	{
		this.icon.src = ihelpuoo.http.server().icon("001_open.gif");
		this.sub.style.display = "block";
	}
	
	,
	closeSub: function()
	{
		this.icon.src = ihelpuoo.http.server().icon("001.gif");
		this.sub.style.display = "none";
	}
	
	,
	isOpened: function()
	{
		return this.sub.style.display == "block";
	}
	
	,
	highlight: function()
	{
		this.shell.className = "mshell_hightlight";
	}
	
	,
	dishighlight: function()
	{
		this.shell.className = "mshell";
	}
}